package gui.event.tiemchung;

import gui.event.ulti.Util;
import gui.tiemchung.*;
import java.awt.print.PrinterException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.JTable;

public class TCChiTietDlg_event {
    
    public static final void btnThemActionPerformed(JDialog parent, boolean modal ) {
         JDialog tcTaoPhieuTiemChung = new TCThemPhieuTiemChung_Full(parent, modal);
        tcTaoPhieuTiemChung.setVisible(true);
    }
    
    public static final void btnSuaChiTietActionPerformed(JDialog parent, boolean modal) {
        JDialog tcSuaPhieuTiemChung = new TCSuaPhieuTiemChung_Dialog(parent, modal);
        tcSuaPhieuTiemChung.setVisible(true);
    }
    public static final void btnSuaHoSoActionPerformed(JDialog parent, boolean modal) {
        JDialog tcSuaHoSo = new TCSuaHoSo_Dialog(null,parent, modal);
        tcSuaHoSo.setVisible(true);
    }
        
    public static final void btnInActionPerformed(JTable tbl) {
        try {
            tbl.print();
        } catch (PrinterException ex) {
            Logger.getLogger(TCChiTietDlg_event.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    public static final void btnChiTietActionPerformed() {
        JOptionPane.showMessageDialog(null, "OK");
    }
    
    public static final void btnCloseActionPerformed(JDialog dlg) {
        dlg.dispose();
    }
    
    public static final void tblVatNuoiFocusGained(List<JButton> listButtons) {
        Util.enableListButtons(listButtons);
    }
    
    public static final void tblVatNuoiFocusLost(List<JButton> listButtons) {
        Util.disableListButtons(listButtons);
    }
}
